package com.company.common.function.swagger.controller;


import com.company.common.function.swagger.model.ProjectUser;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

@Api(tags = "小项目用户相关信息")
@RestController
@RequestMapping("/ProjectUser")
public class ProjectUserController {

    @ApiOperation("获取用户信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "username", value = "用户名", dataType = "int", paramType = "hander"
                    , defaultValue = "zhangsen", example = "list"),
            @ApiImplicitParam(name = "password", value = "用户密码")
    })
    @GetMapping
    public String getprojectUser(String username, String password) {
        return "user";
    }

    @ApiOperation("添加项目用户")
    @PostMapping
    public ProjectUser postprojectUser(@RequestBody ProjectUser projectUser) {
        return projectUser;
    }

    @ApiOperation("删除项目用户")
    @DeleteMapping
    public ProjectUser deleteprojectUser(@RequestBody ProjectUser projectUser) {
        return projectUser;
    }
}
